package com.qtzw.service.impl;

import com.qtzw.domain.User;
import com.qtzw.mapper.UserMapper;
import com.qtzw.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    public User queryFirstUser() {

        User user = null;
        try {
            user = userMapper.queryFirstUser();
            log.info("query user:{}", user);
        } catch (Exception e) {
            log.error("query user error:", e);
        }

        return user;
    }
}
